Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Nov 7, 2025

Description

This PR adds an environment variable for automatically updating preinstalled Snaps and enables it. Following onboarding and as long as the user doesn't opt-out, the Snaps registry will be queried and used to serve updates for preinstalled Snaps.

We also keep the existing condition in case the feature flag is turned off in the feature for backwards compatibility with users of third party Snaps.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Enable automatic updates of preinstalled Snaps


Note

Adds an env-flagged auto-update for preinstalled Snaps and refreshes the Snaps registry after onboarding; updates tests and bumps snaps-controllers.

  • Snaps/Controller:
    • Add postOnboardingInitialization logic to call snapController.updateRegistry() when AUTO_UPDATE_PREINSTALLED_SNAPS is enabled or when any non-preinstalled snap exists; remove redundant background trigger.
    • Pass new feature flag autoUpdatePreinstalledSnaps to SnapController via SnapControllerInit (read from process.env.AUTO_UPDATE_PREINSTALLED_SNAPS).
  • Config:
    • Define AUTO_UPDATE_PREINSTALLED_SNAPS: 'true' in builds.yml.
  • Tests:
    • Update snap-controller-init test expectations to include autoUpdatePreinstalledSnaps.
    • Adjust metrics state snapshots to expect populated SnapsRegistry.database and lastUpdated.
  • Dependencies:
    • Bump @metamask/snaps-controllers to ^16.1.1.

Written by Cursor Bugbot for commit 73911c7. This will update automatically on new commits. Configure here.

@metamaskbot metamaskbot added the team-core-platform Core Platform team label Nov 7, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Nov 7, 2025

✨ Files requiring CODEOWNER review ✨

🫰 @MetaMask/core-platform (2 files, +5 -0)
  • 📁 app/
    • 📁 scripts/
      • 📁 controller-init/
        • 📁 snaps/
          • 📄 snap-controller-init.test.ts +1 -0
          • 📄 snap-controller-init.ts +4 -0

@github-actions github-actions bot added the size-S label Nov 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [e71e285]
UI Startup Metrics (1228 ± 96 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1228107414829612841447
load105793612598411121213
domContentLoaded105193012388311071206
domInteractive221585142060
firstPaint643116127142410691185
backgroundConnect2342182989236244
firstReactRender24184842529
getState2076192436
initialActions001001
loadScripts823701100580875973
setupStore1063241116
numNetworkReqs1367619672
BrowserifyPower User HomeuiStartup18671753223114819102231
load1009901135316011981353
domContentLoaded999895131115611941311
domInteractive291582214982
firstPaint69212213614319231361
backgroundConnect23622126712237267
firstReactRender29255172751
getState1736927839189278
initialActions002102
loadScripts77567210811549601081
setupStore12102751227
numNetworkReqs1166923554153235
WebpackStandard HomeuiStartup8647211234838911034
load62257499069621795
domContentLoaded61456895565615775
domInteractive171271111545
firstPaint19661882176201594
backgroundConnect261384142960
firstReactRender311968103743
getState1263541319
initialActions001001
loadScripts61156694563612765
setupStore1373751422
numNetworkReqs1367619870
WebpackPower User HomeuiStartup12641140165417212481654
load655577955117713955
domContentLoaded63355883296701832
domInteractive251268183668
firstPaint396114860292705860
backgroundConnect46102585746258
firstReactRender27243122731
getState1409916621151166
initialActions001001
loadScripts62955682293691822
setupStore1062961129
numNetworkReqs1016618645165186
FirefoxBrowserifyStandard HomeuiStartup14211231198815114431767
load1203106914729012401417
domContentLoaded1203106914729012401417
domInteractive1073527642114202
firstPaint------
backgroundConnect4222192244788
firstReactRender24204652536
getState1177481022
initialActions001001
loadScripts1178105314478212061362
setupStore157200271136
numNetworkReqs1467820775
BrowserifyPower User HomeuiStartup23501978335134225393351
load13041089167316714051673
domContentLoaded13031088167216714051672
domInteractive16483395111327395
firstPaint------
backgroundConnect10529380102135380
firstReactRender412763104763
getState1177616330147163
initialActions106116
loadScripts12751068165116413591651
setupStore2461052628105
numNetworkReqs1346931582204315
WebpackStandard HomeuiStartup15981423210612816641875
load13581188163710414311557
domContentLoaded13581187163710414301557
domInteractive1033031144114185
firstPaint------
backgroundConnect44181632347104
firstReactRender352491153776
getState1275381221
initialActions002001
loadScripts1331116315479814031526
setupStore166199241349
numNetworkReqs1267016755
WebpackPower User HomeuiStartup25992183324928328443249
load15831322200419717522004
domContentLoaded15831322200419717512004
domInteractive16550479134308479
firstPaint------
backgroundConnect893319151164191
firstReactRender40315474654
getState1289518430163184
initialActions20317131
loadScripts15451294196919217251969
setupStore26681254081
numNetworkReqs1316631078229310
📊 Page Load Benchmark Results

Current Commit: e71e285 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±47ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±43ms) 🟢 | historical mean value: 716ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±13ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 47ms 1.01s 1.39s 1.06s 1.39s
domContentLoaded 723ms 43ms 701ms 1.05s 747ms 1.05s
firstPaint 77ms 13ms 64ms 188ms 84ms 188ms
firstContentfulPaint 77ms 13ms 64ms 188ms 84ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 151 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [be4a143]
UI Startup Metrics (1218 ± 82 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1218105614448212641378
load105089912307711011188
domContentLoaded104489212247710951182
domInteractive211474131958
firstPaint63689122141110471146
backgroundConnect2322202587236242
firstReactRender26185672742
getState22767102642
initialActions001001
loadScripts81966498275868958
setupStore1163641119
numNetworkReqs1367419673
BrowserifyPower User HomeuiStartup19721747250024921662500
load1085915165921413251659
domContentLoaded1077905164121013191641
domInteractive311692214992
firstPaint832173167745610411677
backgroundConnect24022227012245270
firstReactRender28253622836
getState17415521618192216
initialActions001011
loadScripts846689139520911021395
setupStore12102431224
numNetworkReqs1947629372264293
WebpackStandard HomeuiStartup8337121157928351098
load60955395283598869
domContentLoaded60154992378592852
domInteractive16126391438
firstPaint20361891177202575
backgroundConnect241265132457
firstReactRender291864103445
getState1052631215
initialActions001001
loadScripts59854691376590842
setupStore1262941318
numNetworkReqs1367619871
WebpackPower User HomeuiStartup13181150177217814471772
load64856680783768807
domContentLoaded63155577976736779
domInteractive251279194779
firstPaint34671756240594756
backgroundConnect661222767147227
firstReactRender27242922829
getState1429517725160177
initialActions001001
loadScripts62755276973727769
setupStore1262661526
numNetworkReqs1677132292291322
FirefoxBrowserifyStandard HomeuiStartup14231276198413614441785
load1199109914237512381353
domContentLoaded1198109814237512381353
domInteractive1153336149121209
firstPaint------
backgroundConnect4224121194987
firstReactRender24203932531
getState1168791024
initialActions001001
loadScripts1173108013416812151299
setupStore146245261131
numNetworkReqs1267216760
BrowserifyPower User HomeuiStartup24332010343338026923433
load13921157230730016192307
domContentLoaded13921157230630016182306
domInteractive24383937242486937
firstPaint------
backgroundConnect1043025576201255
firstReactRender42306095160
getState1253419437159194
initialActions30389138
loadScripts13531136227129915912271
setupStore3151143655114
numNetworkReqs1367331573211315
WebpackStandard HomeuiStartup15921401200513216311912
load13461197164910414051542
domContentLoaded13451196164910414051542
domInteractive993223233110166
firstPaint------
backgroundConnect44251412249111
firstReactRender362494173878
getState137177191148
initialActions001001
loadScripts13171163155810013751514
setupStore16699191375
numNetworkReqs1366717865
WebpackPower User HomeuiStartup25642213336228427523362
load15541214195119217051951
domContentLoaded15531214195119217041951
domInteractive19376537153305537
firstPaint------
backgroundConnect1023631572141315
firstReactRender42325475054
getState1379322840176228
initialActions405714157
loadScripts15161195188518316731885
setupStore25673213973
numNetworkReqs1496330666194306
📊 Page Load Benchmark Results

Current Commit: be4a143 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±36ms) 🟢 | historical mean value: 716ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±10ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.01s 1.32s 1.05s 1.32s
domContentLoaded 723ms 36ms 702ms 987ms 738ms 987ms
firstPaint 78ms 10ms 60ms 164ms 88ms 164ms
firstContentfulPaint 78ms 10ms 60ms 164ms 88ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 151 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [6db7a96]
UI Startup Metrics (1246 ± 100 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12461079157810013071468
load107089913509311371290
domContentLoaded106489213409211321253
domInteractive221499151957
firstPaint61791134643410541200
backgroundConnect2332192789236250
firstReactRender27175273144
getState21679122448
initialActions001001
loadScripts8386681116909071033
setupStore1162131217
numNetworkReqs1367519670
BrowserifyPower User HomeuiStartup19001732222513520242225
load1037898146718212601467
domContentLoaded1030891146018112491460
domInteractive301597235197
firstPaint403171998274431998
backgroundConnect23922330018243300
firstReactRender28254242842
getState17413222021194220
initialActions001001
loadScripts79967512161739941216
setupStore14947101147
numNetworkReqs1217318342159183
WebpackStandard HomeuiStartup84972213811038511077
load613559113085609839
domContentLoaded606554110481603821
domInteractive16125081438
firstPaint20762860190199613
backgroundConnect261379142863
firstReactRender3218237223545
getState1163041318
initialActions002001
loadScripts603552109379600811
setupStore1262941321
numNetworkReqs1467420873
WebpackPower User HomeuiStartup12241075184918712861849
load635547987142692987
domContentLoaded609534952121654952
domInteractive251373184073
firstPaint412116957272564957
backgroundConnect711126578153265
firstReactRender26243022730
getState1288114922141149
initialActions001011
loadScripts605532944119646944
setupStore86142814
numNetworkReqs1096817039163170
FirefoxBrowserifyStandard HomeuiStartup14981303195812515571736
load1265111914899213131438
domContentLoaded1264111814889213131437
domInteractive1133527043117216
firstPaint------
backgroundConnect4623243285282
firstReactRender26214542741
getState1288191222
initialActions001001
loadScripts1238110014698712881398
setupStore1274761227
numNetworkReqs1267516760
BrowserifyPower User HomeuiStartup24532130328332724383283
load13901191171516516191715
domContentLoaded13901191171416516191714
domInteractive210106560155359560
firstPaint------
backgroundConnect932537010263370
firstReactRender423076125176
getState1237826842126268
initialActions102112
loadScripts13631161168816515851688
setupStore3051003150100
numNetworkReqs1296730576202305
WebpackStandard HomeuiStartup16461444214114916732016
load13951196181512014231675
domContentLoaded13941196181412014231675
domInteractive1003237849109176
firstPaint------
backgroundConnect51261322553121
firstReactRender362485163580
getState1276081121
initialActions002001
loadScripts13621179172311013931645
setupStore16775151360
numNetworkReqs1366917864
WebpackPower User HomeuiStartup25092118327136128743271
load14721236188920916771889
domContentLoaded14721235188820916771888
domInteractive18437569172403569
firstPaint------
backgroundConnect893228274119282
firstReactRender413074104274
getState1186619336146193
initialActions505513255
loadScripts14421216184320316461843
setupStore3752306039230
numNetworkReqs1336531695241316
📊 Page Load Benchmark Results

Current Commit: 6db7a96 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±36ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.31s 1.07s 1.31s
domContentLoaded 720ms 36ms 694ms 982ms 754ms 982ms
firstPaint 76ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 76ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 248 Bytes (0.01%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@FrederikBolding FrederikBolding force-pushed the fb/preinstalled-snaps-ota branch from 6db7a96 to 6469b23 Compare November 7, 2025 13:42
@metamaskbot
Copy link
Collaborator

Builds ready [6469b23]
UI Startup Metrics (1216 ± 91 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1216105114499112961368
load105591012238311161183
domContentLoaded104990712088211101174
domInteractive2114107141853
firstPaint581152124742710701200
backgroundConnect2302162708234242
firstReactRender24174442632
getState2075982634
initialActions001001
loadScripts82469298581882947
setupStore1051821114
numNetworkReqs1367419672
BrowserifyPower User HomeuiStartup19781759283132623702831
load1080924168822913181688
domContentLoaded1071916166422413111664
domInteractive321678225978
firstPaint771153170150513171701
backgroundConnect2362252619240261
firstReactRender28243222832
getState17115519613182196
initialActions001011
loadScripts844687142222110901422
setupStore11101611216
numNetworkReqs1197324972235249
WebpackStandard HomeuiStartup811694119282823999
load59554995871589766
domContentLoaded58854592666583752
domInteractive15115381336
firstPaint19854854192187653
backgroundConnect241177152567
firstReactRender281889103335
getState1052231215
initialActions002001
loadScripts58554291664581742
setupStore1154261227
numNetworkReqs1367119869
WebpackPower User HomeuiStartup11461023161116711631611
load587518876107632876
domContentLoaded573507835101613835
domInteractive201260132960
firstPaint30254844238527844
backgroundConnect55112156144215
firstReactRender25222922529
getState1237815021136150
initialActions001011
loadScripts57050682899606828
setupStore95266926
numNetworkReqs1067116739164167
FirefoxBrowserifyStandard HomeuiStartup15451361201513615811905
load12931169171710413261551
domContentLoaded12921169171610413251550
domInteractive1213744664122246
firstPaint------
backgroundConnect50252793453124
firstReactRender28227062832
getState1286971323
initialActions002011
loadScripts1264115216959613001468
setupStore158136141435
numNetworkReqs1266916764
BrowserifyPower User HomeuiStartup22852014259416524412594
load13461145177419415041774
domContentLoaded13461144177419415031774
domInteractive16176393110205393
firstPaint------
backgroundConnect822926575151265
firstReactRender39295274552
getState1159115626151156
initialActions101011
loadScripts13061126162916514341629
setupStore3281253648125
numNetworkReqs1337221760207217
WebpackStandard HomeuiStartup15951421223415016072002
load13491210168310213951599
domContentLoaded13481209168210213951599
domInteractive953120626106144
firstPaint------
backgroundConnect4625212254989
firstReactRender352481143578
getState1276791124
initialActions002001
loadScripts1322118816139513661528
setupStore186227311262
numNetworkReqs1366918767
WebpackPower User HomeuiStartup24632213303121526193031
load15321248186221117431862
domContentLoaded15311247186121117431861
domInteractive16937479162357479
firstPaint------
backgroundConnect71321734187173
firstReactRender46315975059
getState1327118934169189
initialActions101011
loadScripts15051229182420717201824
setupStore2861213127121
numNetworkReqs1316123363202233
📊 Page Load Benchmark Results

Current Commit: 6469b23 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±39ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±37ms) 🟢 | historical mean value: 719ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±11ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 39ms 1.01s 1.33s 1.06s 1.33s
domContentLoaded 730ms 37ms 702ms 1.00s 747ms 1.00s
firstPaint 78ms 11ms 60ms 172ms 84ms 172ms
firstContentfulPaint 78ms 11ms 60ms 172ms 84ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 156 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​snaps-controllers@​16.1.0 ⏵ 16.1.198 -210076 -2498 -250 -50

View full report

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 11, 2025
@FrederikBolding FrederikBolding marked this pull request as ready for review November 11, 2025 12:30
@FrederikBolding FrederikBolding requested a review from a team as a code owner November 11, 2025 12:30
Comment on lines +354 to +355
"database": "object",
"lastUpdated": "number",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why these changed now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The registry was likely not updated in these tests before because the fixture didn't have any third party Snaps. Before this PR we would only update the registry if you had a third party Snap that could have been blocked.

@metamaskbot
Copy link
Collaborator

Builds ready [73911c7]
UI Startup Metrics (1110 ± 92 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup111096516419211621232
load94979614608910011080
domContentLoaded9437891453889951074
domInteractive2114183191750
firstPaint6417111253609531076
backgroundConnect1821682047187195
firstReactRender2717117152944
getState20855102443
initialActions001001
loadScripts767612126687823893
setupStore1072531117
numNetworkReqs1367620675
BrowserifyPower User HomeuiStartup19791746259725221942597
load1037914142415512001424
domContentLoaded1028908139715011941397
domInteractive301571195471
firstPaint804167143440110481434
backgroundConnect23622226111242261
firstReactRender29264243042
getState17915923020200230
initialActions001011
loadScripts80168411581489691158
setupStore14103771237
numNetworkReqs1247425471230254
WebpackStandard HomeuiStartup8377181198928441084
load61155692681601872
domContentLoaded60455090276595849
domInteractive16126091440
firstPaint20860899184204608
backgroundConnect261179152964
firstReactRender3018149163438
getState1263851418
initialActions003001
loadScripts60154789274592839
setupStore1262541319
numNetworkReqs1367319870
WebpackPower User HomeuiStartup12791109177821615751778
load636557940121696940
domContentLoaded621547917113660917
domInteractive211248133648
firstPaint37976926280581926
backgroundConnect4891715371171
firstReactRender26242912729
getState1358815923148159
initialActions001001
loadScripts617545907109651907
setupStore14639102439
numNetworkReqs1086821953172219
FirefoxBrowserifyStandard HomeuiStartup14441280198914014931786
load1212109114608212571375
domContentLoaded1212109114598212561374
domInteractive1013631441108184
firstPaint------
backgroundConnect4023191214568
firstReactRender27216682646
getState137203221021
initialActions001001
loadScripts1189107414418012341352
setupStore136108121335
numNetworkReqs1266115759
BrowserifyPower User HomeuiStartup24912157331431125363314
load14021173178321517321783
domContentLoaded14021173178221517311782
domInteractive20883575181491575
firstPaint------
backgroundConnect1113428283182282
firstReactRender44347095270
getState1359920130160201
initialActions102112
loadScripts13481150172919915181729
setupStore3161233042123
numNetworkReqs1546932486207324
WebpackStandard HomeuiStartup15901399226916316121956
load13441179170210913731592
domContentLoaded13431179170211013731591
domInteractive923034241106172
firstPaint------
backgroundConnect47251752552106
firstReactRender3524136183279
getState157181231120
initialActions001001
loadScripts13161163167210213461551
setupStore156137181351
numNetworkReqs1367017765
WebpackPower User HomeuiStartup23972073330230826043302
load14651260206421316032064
domContentLoaded14651260206321216032063
domInteractive15336445118235445
firstPaint------
backgroundConnect72282014798201
firstReactRender402965104765
getState1156826844126268
initialActions102112
loadScripts14271231192319015341923
setupStore4962876877287
numNetworkReqs1326126371182263
📊 Page Load Benchmark Results

Current Commit: 73911c7 | Date: 11/11/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±72ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±69ms) 🟢 | historical mean value: 717ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 72ms 1.01s 1.33s 1.29s 1.33s
domContentLoaded 740ms 69ms 696ms 1.01s 961ms 1.01s
firstPaint 77ms 12ms 60ms 188ms 84ms 188ms
firstContentfulPaint 77ms 12ms 60ms 188ms 84ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 12.25 KiB (0.26%)
  • ui: 4.28 KiB (0.06%)
  • common: 14.72 KiB (0.17%)

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FrederikBolding FrederikBolding added this pull request to the merge queue Nov 11, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR adds an environment variable for automatically updating
preinstalled Snaps and enables it. Following onboarding and as long as
the user doesn't opt-out, the Snaps registry will be queried and used to
serve updates for preinstalled Snaps.

We also keep the existing condition in case the feature flag is turned
off in the feature for backwards compatibility with users of third party
Snaps.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37610?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Enable automatic updates of preinstalled Snaps 

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds an env-flagged auto-update for preinstalled Snaps and refreshes
the Snaps registry after onboarding; updates tests and bumps
snaps-controllers.
> 
> - **Snaps/Controller**:
> - Add `postOnboardingInitialization` logic to call
`snapController.updateRegistry()` when `AUTO_UPDATE_PREINSTALLED_SNAPS`
is enabled or when any non-preinstalled snap exists; remove redundant
background trigger.
> - Pass new feature flag `autoUpdatePreinstalledSnaps` to
`SnapController` via `SnapControllerInit` (read from
`process.env.AUTO_UPDATE_PREINSTALLED_SNAPS`).
> - **Config**:
>   - Define `AUTO_UPDATE_PREINSTALLED_SNAPS: 'true'` in `builds.yml`.
> - **Tests**:
> - Update `snap-controller-init` test expectations to include
`autoUpdatePreinstalledSnaps`.
> - Adjust metrics state snapshots to expect populated
`SnapsRegistry.database` and `lastUpdated`.
> - **Dependencies**:
>   - Bump `@metamask/snaps-controllers` to `^16.1.1`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
73911c7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 11, 2025
@FrederikBolding FrederikBolding added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit f8d6831 Nov 11, 2025
336 of 339 checks passed
@FrederikBolding FrederikBolding deleted the fb/preinstalled-snaps-ota branch November 11, 2025 14:10
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2025
@metamaskbot metamaskbot added the release-13.10.0 Issue or pull request that will be included in release 13.10.0 label Nov 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.10.0 Issue or pull request that will be included in release 13.10.0 size-S team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants